using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class GetObjectSize : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        Renderer rend = GetComponent<Renderer>();
        if (rend != null)
        {
            Vector3 size = rend.bounds.size;
            Debug.Log($"长宽高: {size.x}, {size.y}, {size.z}");
        }
    }

    // Update is called once per frame
    void Update()
    {

    }
}
